<template>
	<view>
		<view class="list-item">
			<image src="../../../static/phonecall.png" mode="" class="phonecall" @click="phonecall()"></image>
			<view class="item">
				<view class="head">
					<image src="../../../static/store-mini.png" mode="" class="image"></image>
					<view class="title">
						购买门店
					</view>
				</view>
				<view class="text bold">
					{{detail.shop_name}}
				</view>
				<view class="text">
					{{detail.shop_address}}
				</view>
			</view>
			<view class="item">
				<view class="head">
					<image src="../../../static/card-mini.png" mode="" class="image"></image>
					<view class="title">
						购买卡项
					</view>
				</view>
				<view class="text bold">
					{{detail.name}}
				</view>
			</view>
			<view class="item">
				<view class="head">
					<image src="../../../static/label.png" mode="" class="image"></image>
					<view class="title">
						包含服务
					</view>
				</view>
				<view class="text" v-for="(item,key) in detail.services" :key="key">
					{{item.name}}
				</view>
			</view>
			<view class="item">
				<view class="head">
					<image src="../../../static/clock.png" mode="" class="image"></image>
					<view class="title">
						下单时间
					</view>
				</view>
				<view class="text">
					{{detail.buy_time}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:1,
				detail:{},
			};
		},
		onLoad:function(e){
			this.id=e.id;
			this.getOrderDetail();
		},
		methods:{
			phonecall:function(){
				uni.makePhoneCall({
					phoneNumber:this.detail.phone
				})
			},
			getOrderDetail:function(){
				uni.showLoading({
					title:"加载中"
				});
				var that=this;
				that.ajax("/order/detail_card",{
					token:uni.getStorageSync("token"),
					id:this.id,
				},function(res){
					that.detail=res.data.data;
				});
			}
		}
	}
</script>

<style>
	page{
		background: #f7f7f7;
	}
	.image{
		width: 25upx;
		height: 25upx;
		margin-right: 10upx;
	}
	.text{
		font-size: 24upx;
		color:#585858;
		margin-left: 35upx;
	}
	.bold{
		color: #303030;
		font-size: 30upx;
		font-weight: 600;
	}
	.list-head{
		font-size: 24upx;
		color: #272727;
		padding: 20upx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}
	.order-list{
		
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 20upx;
	}
	.order-tab-active{
		margin-right: 20upx;
		color:#3d3e46;
		background: #ffe55c;
		padding: 6upx 30upx;
		border-radius: 30upx;
		white-space: nowrap;
	}
	.order-tab{
		margin-right: 20upx;
		color: #bbbbbb;
		padding: 14upx 30upx;
		white-space: nowrap;
	}
	.nostyle{
		margin: 0;
		padding: 0;
		background: none;
		border:none;
	}
	.nostyle:after{
		border:none;
	}
	.order-scroll{
		background: #f5f5f5;
	}
	.list{
		margin-bottom: 20upx;
		background: #ffffff;
		padding: 0 20upx;
		
	}
	.list-head{
		padding: 20upx 0;
		display: flex;
		flex-direction: row;
		align-items: center;
		border-bottom: 1upx solid #f5f5f5;
	}
	.list-title{
		flex: 1;
		font-size: 30upx;
	}
	.list-total{
		font-size: 24upx;
		color: #b6b6b6;
	}
	.list-item{
		padding: 40upx;
		position: relative;
		background: #ffffff;
		border-radius: 20upx;
		margin:25upx;
	}
	.item-image{
		width: 260upx;
		height: 210upx;
		border-radius: 10upx;
		margin-right: 20upx;
	}
	.item-info{
		flex: 1;
	}
	.item-title{
		font-size: 25upx;
		display: flex;
		flex-direction: row;
	}
	.item-cart{
		flex: 1;
		display: flex;
		flex-direction: row;
		align-content: flex-end;
		align-items: flex-end;
	}
	.weight{
		font-size: 16upx;
		line-height: 30upx;
		background: #e5e5e5;
		border-radius: 6upx;
		display: inline-block;
		padding: 0 10upx;
		color: #ffffff;
	}
	.item-bottom{
		display: flex;
		flex-direction: row;
		align-items: center;
		height: 85upx;
		font-size: 25upx;
	}
	.item-price{
		flex: 1;
		font-size: 24upx;
		color: #ff340e;
		font-weight: 600;
	}
	.item-count{
		flex: 1;
		text-align: right;
		font-size: 22upx;
		color: #bcbcbc;
	}
	.phonecall{
		position: absolute;
		top:40upx;
		right: 40upx;
		width: 45upx;
		height: 45upx;
	}
	.preview{
		margin:20upx;
		padding: 30upx;
		background: #ffffff;
		border-radius: 15upx;
		position: relative;
	}
	.item{
		margin-bottom: 10upx;
	}
	.head{
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 10upx 0;
	}
	.title{
		color: #b3b3b3;
		font-size: 22upx;
	}
</style>
